export const imgerror = {
  inserted(el, binding) {
    //el是指令所得dom节点信息
    // console.log(el)
    // binding是指令所包含的信息
    // console.log(binding)
    el.onerror = () => {
      // console.log('图片加载失败')
      //给img的src重新赋值
      el.src = binding.value
    }
  }
}
